package com.example.demo.mapper;

import com.example.demo.model.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2023-12-06
 * Time: 20:13
 */
@Mapper
public interface AccountMapper {

    public int create(@Param("number")Integer number,@Param("money")Integer money,@Param("password")String password,@Param("userId")Integer userId);

    public List<Account> selectAccountByUserId(@Param("userId") Integer userId);

    public Account selectAccountByNumber(@Param("number")Integer number);

    public int reduceMoney(@Param("number") Integer number,@Param("money") Integer money);

    public int addMoney(@Param("number") Integer number,@Param("money") Integer money);
}
